#include <stdio.h>

int main() 
{
    int a = 0;
    scanf("%d",&a);
    if  (a / 10 >= 10)
    {
        a = a / 10;
        printf("%d",a % 10);
    }
    else 
    {
        printf("%d",a / 10);
    }
    return 0;
}